package com.wonders.module.ws.excutor;

import org.springframework.stereotype.Component;

import com.wonders.common.ws.server.excutor.BaseXtptWsExcutor;
import com.wonders.module.ws.excutor.xtpt.TestExcutor;
import com.wonders.module.ws.excutor.xtptOld.TestOldExcutor;

/**
 * 接口业务执行器工厂
 * 
 * @author WuBin
 * 
 */
@Component
public class XtptWsExcutorFactory {

	/**
	 * 获取2.0接口业务执行器
	 * 
	 * @param busCode
	 *            业务代码
	 * @return 接口业务执行器
	 */
	public BaseXtptWsExcutor getWsExcutor(String busCode) {
		if ("Test".equals(busCode)) {
			return new TestExcutor();
		}
		return null;
	}

	/**
	 * 获取1.0接口业务执行器
	 * 
	 * @param busCode
	 *            业务代码
	 * @return 接口业务执行器
	 */
	public BaseXtptWsExcutor getOldWsExcutor(String busCode) {
		if ("TestOld".equals(busCode)) {
			return new TestOldExcutor();
		}
		return null;
	}

}
